#ifndef MEMEXCEPTION_H
#define MEMEXCEPTION_H



class DataException:public exception
{
private:
    string m_msg;
public:
    DataException () :
        m_msg ("数据异常！") {}
    DataException (const string& msg) :
        m_msg ("数据异常:") {
        m_msg += msg;
        m_msg += "！";
        }
    ~DataException ()  throw(){}
    const char* what () throw()  {
        return m_msg.c_str();
    }
};

class DBException:public exception
{
private:
    string m_msg;
public:
    DBException () :
        m_msg ("数据库异常！") {}
    DBException (const string& msg) :
        m_msg ("数据库异常:") {
        m_msg += msg;
        m_msg += "！";
        }
    ~DBException ()  throw(){}
    const char* what () throw()  {
        return m_msg.c_str();
    }
};




#endif // MEMEXCEPTION_H
